feat(pkg): add --rpm-file flag to package list command#136
Open
liunan-ms wants to merge 1 commit intomicrosoft:mainfrom
Open
feat(pkg): add --rpm-file flag to package list command#136liunan-ms wants to merge 1 commit intomicrosoft:mainfrom
liunan-ms wants to merge 1 commit intomicrosoft:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new input mode to azldev package list to enumerate SRPMs and their binary RPMs from a JSON “RPM source map” file, and surfaces the result kind via a new type column.
Changes:
- Add
--rpm-file <file>andListPackageOptions.RPMFile, plus JSON parsing/resolution helpers to emit both SRPM and RPM rows. - Extend output model with a
typefield (srpm/rpm) and wire it through existing listing/synthesis paths. - Update user guide and regenerate CLI reference docs; add a test covering SRPM vs RPM channel selection.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| internal/app/azldev/cmds/pkg/list.go | Implements --rpm-file, JSON parsing, SRPM/RPM resolution, and adds type to results/help text. |
| internal/app/azldev/cmds/pkg/list_test.go | Updates existing list tests and adds coverage for SRPM-file resolution behavior. |
| docs/user/reference/cli/azldev_package_list.md | Regenerated CLI docs reflecting new --rpm-file option and updated help text. |
| docs/user/how-to/inspect-package-config.md | Documents the new type column and --rpm-file workflow and constraints. |
1f23e96 to
8e357a4
Compare
Add '--rpm-file <file>' flag to 'azldev package list' that accepts a JSON
RPM source map file (array of {packageName, sourcePackageName} records) and
lists all SRPMs and their binary RPMs with their resolved publish channels.
- Add RPMFile string field to ListPackageOptions
- Add listPackagesFromRPMFile helper to handle the --rpm-file path with early return
- Add resolveFromSRPMFile to resolve each SRPM (via SRPMChannel) and each binary
RPM (via full publish-channel stack) from the JSON file
- Results include a 'type' column ('srpm' or 'rpm') to distinguish entry kinds
- '--rpm-file' is mutually exclusive with '-a', '-p', and '--synthesize-debug-packages'
- Update docs/user/how-to/inspect-package-config.md: add Type column to output
table, document --rpm-file usage and mutual exclusivity, add JSON example
- Update auto-generated CLI reference docs (azldev_package_list.md)
8e357a4 to
c3b17b0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds
--rpm-file <file>flag toazldev package listthat accepts a JSON RPM source map file (array of {packageName, sourcePackageName} records) and lists all SRPMs and their binary RPMs with their resolved publish channels.JSON RPM source map file format:
[ { "packageName": "cmake-gui", "sourcePackageName": "cmake" }, ... ]Output:
[ { "packageName": "cmake", "type": "srpm", "group": "", "component": "cmake", "publishChannel": "rpm-base-srpm" }, { "packageName": "cmake", "type": "rpm", "group": "", "component": "cmake", "publishChannel": "rpm-base" }, { "packageName": "cmake-data", "type": "rpm", "group": "", "component": "cmake", "publishChannel": "rpm-base" }, { "packageName": "cmake-doc", "type": "rpm", "group": "", "component": "cmake", "publishChannel": "rpm-base" }, { "packageName": "cmake-filesystem", "type": "rpm", "group": "", "component": "cmake", "publishChannel": "rpm-base" }, { "packageName": "cmake-gui", "type": "rpm", "group": "sdk-published", "component": "cmake", "publishChannel": "rpms-sdk" }, { "packageName": "cmake-rpm-macros", "type": "rpm", "group": "", "component": "cmake", "publishChannel": "rpm-base" } ... ]